<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>js的函数和时间处理</title>
		<script type="text/javascript">
			
			// 定义函数
			function showMsg(strMsg){
				//document.write("helloword,"+strMsg)
				document.getElementById("lblMsg").innerHTML = "helloword,"+strMsg;
			}
			
			//调用函数
			// showMsg("小明")
		</script>
	</head>
	<body>
		<label id="lblMsg"></label>
		<br />
		<input type="button" onclick="showMsg('小明')" value="showMsg" />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" value="showMsg" onclick="document.getElementById('lblMsg').innerHTML = 'helloword,';" />
	</body>
</html>
